<script setup>
	async function fetchData() {
		let arrs = Array.from({
			length: 3
		}, (_, index) => index + 1);
		let datas = [];


		for (let i = 0; i < arrs.length; i++) {
			const {
				data
			} = await uni.request({
				url: "http://jsonplaceholder.typicode.com/posts/" + arrs[i]
			});
			datas.push(data);
		}
		console.log(datas);

		arr.forEach(async item => {

		})
	}

	fetchData();


	// let arrs = [1,2,3];
	// let datas = [];

	// arrs.forEach(async item => {
	// 	const {
	// 		data
	// 	} = await uni.request({
	// 		url: "http://jsonplaceholder.typicode.com/posts/" + item
	// 	})
	// 	datas.push(data)
	// })
	// console.log(datas);
</script>
<template>
	<view class="">

	</view>
</template>
<style lang="scss" scoped>

</style>